(function (line) {
    var slice = Array.prototype.slice;
    line.extend(line, {
        /**
         * Give the fn a context scope.
         * @param {Function} fn
         * @param {Object} context
         * @return {Function}
         */
        bind:(function () {
            var nativeBind = Function.prototype.bind;
            return nativeBind ? function (fn, context) {
                return nativeBind.apply(fn, slice.call(arguments, 1));
            } : function (fn, context) {
                if (arguments.length < 2 && line.isUndefined(context)) {
                    return fn;
                }
                var args = slice.call(arguments, 2);
                return function () {
                    var inArgs = slice.call(arguments, 0);
                    return fn.apply(context, args.concat(inArgs));
                }
            }
        }()),
        /**
         * Give a 0ms delay for a function.
         * @param {Function} fn
         * @return {Number}
         */
        defer:function (fn) {
            var args = slice.call(arguments, 1);
            return line.delay(fn, 0, args);
        },
        /**
         * Give a delay for a function.
         * @param {Function} fn
         * @param {Number} wait
         * @return {Number}
         */
        delay:function (fn, wait) {
            var args = slice.call(arguments, 2);
            return setTimeout(function () {
                fn.apply(null, args);
            }, wait);
        }
    });
})(line);